import {request} from "@/utils/request";

export function getUnreadNotificationNum() {
    return request({
        url: `/notification/unread`,
        method: 'get',
        header:{
            isToken: true,
            repeatSubmit: false
        }
    })
}

export function getNotificationList(pageSize,current) {
    return request({
        url: `/notification/front/list/${pageSize}/${current}`,
        method: 'get',
        header:{
            isToken: true,
            repeatSubmit: true
        }
    })
}

export function readNotification(notificationId) {
    return request({
        url: `/notification/read/${notificationId}`,
        method: 'put',
        header:{
            isToken: true,
            repeatSubmit: true
        }
    })
}

export function readAllNotification() {
    return request({
        url: `/notification/read/all`,
        method: 'put',
        header:{
            isToken: true,
            repeatSubmit: true
        }
    })
}
export function deleteNotification(id) {
    return request({
        url: `/notification/delete/${id}`,
        method: 'delete',
        header:{
            isToken: true,
            repeatSubmit: true
        }
    })
}

